/**   
 * 项目名：五位一体化工安全信息平台
 * 日期：    2019-12-06 11:33:19  
 * Copyright (c) 2015- joysuch-版权所有     
 */

package com.joysuch.wwyt.bp.entity;

import static javax.persistence.GenerationType.IDENTITY;
import java.util.Set;
import java.util.LinkedHashSet;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.JoinTable;
import javax.persistence.ManyToOne;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.EntityListeners;

import cn.zlg.common.springmvc.validate.constraints.NotNull;
import com.joysuch.wwyt.core.support.AutoSetCommonFieldListener;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

@EntityListeners({ AuditingEntityListener.class, AutoSetCommonFieldListener.class })
@Entity
@Table(name = "WWYT_BP_REGULATION_DOCUMENT_ARCHIVE")
public class BpRegulationDocumentArchive implements java.io.Serializable{
    
    //columns START
    //ID
    private Long id;
    //原文档ID
    private Long documentId;
    //文档名称
    //@NotNull(field = "文档名称")
    private String name;
    //文档类型ID
    //@NotNull(field = "文档类型")
    private Long documentTypeId;
    //制定人
    private Long makeUserId;
    //状态
    private Integer state;
    // 内容
   // @NotNull(field = "内容")
    private String content;
    //附件ID
    private Long attachmentId;
    //编制时间
    private java.util.Date makeTime;
    // 备注
    private String remark;
    //审核人
    private Long auditUserId;
    //审核时间
    private java.util.Date auditTime;
    //审核备注
    private String auditRemark;
    //归档时间
    private java.util.Date archiveTime;
    //columns END


    public void setId(Long value) {
        this.id = value;
    }
    
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "Id", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }
    
     
    @Column(name = "DOCUMENT_ID")
    public Long getDocumentId() {
        return this.documentId;
    }
    
    public void setDocumentId(Long value) {
        this.documentId = value;
    }
    
     
    @Column(name = "NAME", length = 100)
    public String getName() {
        return this.name;
    }
    
    public void setName(String value) {
        this.name = value;
    }
    
     
    @Column(name = "DOCUMENT_TYPE_ID")
    public Long getDocumentTypeId() {
        return this.documentTypeId;
    }
    
    public void setDocumentTypeId(Long value) {
        this.documentTypeId = value;
    }
    
     
    @Column(name = "MAKE_USER_ID")
    public Long getMakeUserId() {
        return this.makeUserId;
    }
    
    public void setMakeUserId(Long value) {
        this.makeUserId = value;
    }


    @Column(name = "STATE")
    public Integer getState() {
        return this.state;
    }
    
    public void setState(Integer value) {
        this.state = value;
    }

    @Column(name = "CONTENT")
    public String getContent() {
        return this.content;
    }

    public void setContent(String value) {
        this.content = value;
    }
     
    @Column(name = "ATTACHMENT_ID")
    public Long getAttachmentId() {
        return this.attachmentId;
    }
    
    public void setAttachmentId(Long value) {
        this.attachmentId = value;
    }
    
     
    @Column(name = "MAKE_TIME")
    public java.util.Date getMakeTime() {
        return this.makeTime;
    }
    
    public void setMakeTime(java.util.Date value) {
        this.makeTime = value;
    }

    @Column(name = "REMARK")
    public String getRemark() {
        return this.remark;
    }

    public void setRemark(String value) {
        this.remark = value;
    }
     
    @Column(name = "AUDIT_USER_ID")
    public Long getAuditUserId() {
        return this.auditUserId;
    }
    
    public void setAuditUserId(Long value) {
        this.auditUserId = value;
    }
    
     
    @Column(name = "AUDIT_TIME")
    public java.util.Date getAuditTime() {
        return this.auditTime;
    }
    
    public void setAuditTime(java.util.Date value) {
        this.auditTime = value;
    }
    
     
    @Column(name = "AUDIT_REMARK", length = 200)
    public String getAuditRemark() {
        return this.auditRemark;
    }
    
    public void setAuditRemark(String value) {
        this.auditRemark = value;
    }
    
     
    @Column(name = "ARCHIVE_TIME")
    public java.util.Date getArchiveTime() {
        return this.archiveTime;
    }
    
    public void setArchiveTime(java.util.Date value) {
        this.archiveTime = value;
    }
    

    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id",getId())
            .append("documentId",getDocumentId())
            .append("name",getName())
            .append("documentTypeId",getDocumentTypeId())
            .append("makeUserId",getMakeUserId())
            .append("state",getState())
            .append("attachmentId",getAttachmentId())
            .append("makeTime",getMakeTime())
            .append("auditUserId",getAuditUserId())
            .append("auditTime",getAuditTime())
            .append("auditRemark",getAuditRemark())
            .append("archiveTime",getArchiveTime())
            .toString();
    }
    
    public int hashCode() {
        return new HashCodeBuilder()
            .append(getId())
            .toHashCode();
    }
    
    public boolean equals(Object obj) {
        if(obj instanceof BpRegulationDocumentArchive == false) return false;
        if(this == obj) return true;
        BpRegulationDocumentArchive other = (BpRegulationDocumentArchive)obj;
        return new EqualsBuilder()
            .append(getId(),other.getId())
            .isEquals();
    }
}

